% -*- coding: utf-8 -*-
% !TEX program = lualatex

\usepackage[heading=true,scheme=chinese]{ctex}

\newcommand*{\myversion}{2022A}
\newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi}

\usepackage[a4paper,margin=2.5cm]{geometry}

\setlength{\parindent}{0pt}
\setlength{\parskip}{4pt plus 1pt minus 1pt}


\usepackage{codehigh} % https://ctan.org/pkg/codehigh
\usepackage{tabularray}
\usepackage{array,multirow,amsmath}
\usepackage{chemmacros,environ}
\usepackage{enumitem}

\usepackage[firstpage=true]{background}
\backgroundsetup{contents={}}

\UseTblrLibrary{amsmath,booktabs,counter,diagbox,siunitx,varwidth}

\usepackage{hyperref}
\hypersetup{
  colorlinks=true,
  urlcolor=blue3,
  linkcolor=blue3,
}

\usepackage{tcolorbox}
\tcbset{sharp corners, boxrule=0.5pt, colback=red9}

\usepackage{float}
%\usepackage{enumerate}

\setcounter{tocdepth}{1}

\newcommand*{\K}[1]{\texttt{#1}}
\newcommand*{\V}[1]{\texttt{#1}}
\newcommand*{\None}{$\times$}

\DefTblrTemplate{caption-tag}{default}{表\hspace{0.25em}\thetable}
\DefTblrTemplate{contfoot-text}{default}{续下页}
\DefTblrTemplate{conthead-text}{default}{(接前页)}

\NewTblrEnviron{newtblr}
\SetTblrOuter[newtblr]{long}
\SetTblrInner[newtblr]{
  hlines = {white}, column{1,2} = {co=1}, colsep = 5pt,
  row{odd} = {brown8}, row{even} = {gray8},
  row{1} = {fg=white, bg=purple2, font=\bfseries\sffamily},
}

\NewTblrEnviron{spectblr}
\SetTblrOuter[spectblr]{long}
\SetTblrInner[spectblr]{
  hlines = {white}, column{2} = {co=1}, colsep = 5pt,
  row{odd} = {brown8}, row{even} = {gray8},
  row{1} = {fg=white, bg=purple2, font=\bfseries\sffamily},
  rowhead = 1,
}

% \newcommand{\mywarning}[1]{%
%   \begin{tcolorbox}
%   The interfaces in this #1 should be seen as
%   \textcolor{red3}{\bfseries experimental}
%   and are likely to change in future releases, if necessary.
%   Don’t use them in important documents.
%   \end{tcolorbox}
% }
\newcommand{\mywarning}[1]{%
  \begin{tcolorbox}
   #1 中说明的接口是
  \textcolor{red3}{\bfseries 实验性的}
  并且在未来可能会发生变化，
  因此，请勿在重要的文档中使用它们。
  \end{tcolorbox}
}

% \renewcommand*{\thefootnote}{*}

% \newcommand*{\mydate}{Version \myversion\ (\the\year-\mylpad\month-\mylpad\day)\\\myrepo}
% \newcommand*{\myrepo}{\url{https://github.com/lvjr/tabularray}}

\colorlet{highback}{azure9}
\CodeHigh{language=latex/table,style/main=highback,style/code=highback}
\NewCodeHighEnv{code}{style/main=gray9,style/code=gray9}
\NewCodeHighEnv{demo}{style/main=gray9,style/code=gray9,demo}

%\CodeHigh{lite}
